﻿package Part_2_work;

import java.util.Scanner;

public class D_Lucky {
	public static void main(String[] args) {
		System.out.println("我行我素购物管理系统 --> 幸运抽奖\n");
		Scanner sc = new Scanner(System.in);
		System.out.print("请输入4位会员号：");
		int cusNo = sc.nextInt();
		int random = (int)(Math.random()*10);
		int b = cusNo%10/100;
		if(b==random){
			System.out.println("恭喜会员号"+cusNo+"的幸运客户，获得精美MP3一个！");
		}else{
			System.out.println("尊敬的"+cusNo+"客户，很遗憾您没有中奖！");
		}
	}
}
